package com.jy.servlet;

import com.alibaba.fastjson.JSON;
import com.jy.bean.Consignee;
import com.jy.dao.UserDao;
import com.jy.service.ConsigneeService;
import com.jy.service.impl.ConsigneeSericelmpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

public class goodsDetailServlet extends HttpServlet {
    private static final Logger log = LoggerFactory.getLogger(goodsDetailServlet.class);
    ConsigneeService consigneeService;
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            String consignee_id = request.getParameter("consignee_id");
            HttpSession session = request.getSession();
            session.setAttribute("consignee_id", consignee_id);
            log.debug(consignee_id);
            request.getRequestDispatcher("/goodsDetail.jsp").forward(request,response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String consignee_id = request.getParameter("consignee_id");
        HttpSession session = request.getSession();
        session.setAttribute("consignee_id", consignee_id);
        request.getRequestDispatcher("/goodsDetail.jsp").forward(request,response);
    }
}
